package com.ly.auth.controller;

import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
@RequestMapping("/test")
public class TestController {


    @RequestMapping("/login")
    public String login(String username, Model model) {
        model.addAttribute("testKey", "hello " + username);
        return "login";
    }


    @RequestMapping("/test")
    @ResponseBody
    public String test(String username, Model model) {

        return "test " + username;
    }

}
